/* 表单容器样式 */
.traveler-form-container {
    max-width: 800px;  /* 增加最大宽度 */
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.traveler-form-container h2 {
    margin-bottom: 24px;
    color: #333;
    font-size: 24px;
    font-weight: 500;
    border-bottom: 1px solid #eee;
    padding-bottom: 16px;
}

/* 表单组样式 */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-size: 15px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    height: 40px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #40a9ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    outline: none;
}

/* 证件部分样式 */
.documents-section {
    border: 1px solid #e8e8e8;
    padding: 24px;
    border-radius: 4px;
    margin-bottom: 24px;
    background: #fafafa;
}

.documents-section label {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 20px;
    display: block;
    color: #333;
}

.document-item {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    align-items: center;
    transition: all 0.3s;
}

.document-item.show-expiry {
    grid-template-columns: 2fr 2fr 2fr 1fr;
}

.document-item select,
.document-item input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    height: 40px;
    box-sizing: border-box;
    background: #fff;
}

.document-item select:focus,
.document-item input:focus {
    border-color: #40a9ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    outline: none;
}

.remove-document-btn {
    background: #ff4d4f;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    height: 40px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-document-btn:hover {
    background: #ff7875;
}

.add-document-btn {
    width: 100%;
    padding: 12px;
    background: #f0f0f0;
    border: 1px dashed #d9d9d9;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    margin-top: 16px;
    height: 44px;
}

.add-document-btn:hover {
    background: #e6f7ff;
    border-color: #1890ff;
    color: #1890ff;
}

/* 按钮样式 */
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.save-btn,
.cancel-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    height: 40px;
    min-width: 100px;
    transition: all 0.3s;
}

.save-btn {
    background: #1890ff;
    color: white;
}

.save-btn:hover {
    background: #40a9ff;
}

.cancel-btn {
    background: #f0f0f0;
    color: #666;
}

.cancel-btn:hover {
    background: #d9d9d9;
}

/* 错误提示样式 */
.error-message {
    color: #ff4d4f;
    font-size: 13px;
    margin-top: 6px;
}

/* 必填字段标记 */
.required::after {
    content: '*';
    color: #ff4d4f;
    margin-left: 4px;
}

/* 日期输入框特殊样式 */
input[type="date"] {
    font-family: inherit;
}

/* 证件类型切换时的过渡效果 */
.expiry-date-input {
    transition: opacity 0.3s ease;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .traveler-form-container {
        margin: 15px;
        padding: 20px;
    }

    .document-item {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 16px;
    }

    .document-item.show-expiry {
        grid-template-columns: 1fr 1fr;
    }

    .remove-document-btn {
        grid-column: span 2;
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    .traveler-form-container {
        margin: 10px;
        padding: 15px;
    }

    .document-item {
        grid-template-columns: 1fr;
    }

    .document-item.show-expiry {
        grid-template-columns: 1fr;
    }

    .remove-document-btn {
        grid-column: auto;
    }

    .form-actions {
        flex-direction: column;
    }

    .save-btn,
    .cancel-btn {
        width: 100%;
    }
}

/* 添加输入框占位符样式 */
::placeholder {
    color: #bfbfbf;
}

/* 添加选择框箭头样式 */
select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 30px;
}

/* 禁用状态样式 */
input:disabled,
select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* 添加表单组之间的分隔线 */
.form-group:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 20px;
}
